.class public Lcom/xingbook/park/view/a;
.super Landroid/view/View;


# annotations
.annotation build Landroid/annotation/SuppressLint;
    value = {
        "DrawAllocation"
    }
.end annotation


# instance fields
.field private a:I

.field private b:I

.field private c:I

.field private d:Landroid/graphics/Paint;

.field private e:I

.field private f:I

.field private g:I

.field private h:I

.field private i:Ljava/lang/String;

.field private j:I

.field private k:Ljava/lang/String;

.field private l:Ljava/lang/String;

.field private m:Lcom/xingbook/park/view/c;

.field private n:Z

.field private o:Landroid/graphics/RectF;

.field private p:F


# direct methods
.method public constructor <init>(Landroid/content/Context;III)V
    .locals 3

    const/4 v2, 0x0

    invoke-direct {p0, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    new-instance v0, Landroid/graphics/Paint;

    const/4 v1, 0x1

    invoke-direct {v0, v1}, Landroid/graphics/Paint;-><init>(I)V

    iput-object v0, p0, Lcom/xingbook/park/view/a;->d:Landroid/graphics/Paint;

    iput p4, p0, Lcom/xingbook/park/view/a;->j:I

    iput p3, p0, Lcom/xingbook/park/view/a;->e:I

    new-instance v0, Ljava/lang/StringBuilder;

    iget v1, p0, Lcom/xingbook/park/view/a;->h:I

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/xingbook/park/view/a;->i:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/park/view/a;->k:Ljava/lang/String;

    new-instance v0, Ljava/lang/StringBuilder;

    iget v1, p0, Lcom/xingbook/park/view/a;->g:I

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/xingbook/park/view/a;->i:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/park/view/a;->l:Ljava/lang/String;

    int-to-float v0, p2

    iput v0, p0, Lcom/xingbook/park/view/a;->p:F

    new-instance v0, Landroid/graphics/RectF;

    invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V

    iput-object v0, p0, Lcom/xingbook/park/view/a;->o:Landroid/graphics/RectF;

    iget-object v0, p0, Lcom/xingbook/park/view/a;->o:Landroid/graphics/RectF;

    iput v2, v0, Landroid/graphics/RectF;->left:F

    iget-object v0, p0, Lcom/xingbook/park/view/a;->o:Landroid/graphics/RectF;

    iput v2, v0, Landroid/graphics/RectF;->top:F

    new-instance v0, Lcom/xingbook/park/view/c;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lcom/xingbook/park/view/c;-><init>(Lcom/xingbook/park/view/a;Lcom/xingbook/park/view/c;)V

    iput-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    return-void
.end method

.method static synthetic a(Lcom/xingbook/park/view/a;)I
    .locals 1

    iget v0, p0, Lcom/xingbook/park/view/a;->a:I

    return v0
.end method

.method private a()V
    .locals 4

    const-wide/16 v2, 0x3e8

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    if-nez v0, :cond_0

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    iget v0, v0, Lcom/xingbook/park/view/c;->a:I

    if-nez v0, :cond_2

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    const-wide/16 v1, 0x0

    invoke-virtual {v0, v1, v2}, Lcom/xingbook/park/view/c;->setDuration(J)V

    :cond_1
    :goto_1
    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    iget v1, p0, Lcom/xingbook/park/view/a;->a:I

    invoke-virtual {v0, v1}, Lcom/xingbook/park/view/c;->a(I)V

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    invoke-virtual {p0, v0}, Lcom/xingbook/park/view/a;->startAnimation(Landroid/view/animation/Animation;)V

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    iget v0, v0, Lcom/xingbook/park/view/c;->a:I

    const/4 v1, 0x1

    if-ne v0, v1, :cond_3

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    invoke-virtual {v0, v2, v3}, Lcom/xingbook/park/view/c;->setDuration(J)V

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    new-instance v1, Landroid/view/animation/AccelerateInterpolator;

    invoke-direct {v1}, Landroid/view/animation/AccelerateInterpolator;-><init>()V

    invoke-virtual {v0, v1}, Lcom/xingbook/park/view/c;->setInterpolator(Landroid/view/animation/Interpolator;)V

    goto :goto_1

    :cond_3
    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    iget v0, v0, Lcom/xingbook/park/view/c;->a:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_1

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    invoke-virtual {v0, v2, v3}, Lcom/xingbook/park/view/c;->setDuration(J)V

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    new-instance v1, Landroid/view/animation/DecelerateInterpolator;

    invoke-direct {v1}, Landroid/view/animation/DecelerateInterpolator;-><init>()V

    invoke-virtual {v0, v1}, Lcom/xingbook/park/view/c;->setInterpolator(Landroid/view/animation/Interpolator;)V

    goto :goto_1
.end method

.method static synthetic a(Lcom/xingbook/park/view/a;Lcom/xingbook/park/view/c;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    return-void
.end method

.method static synthetic b(Lcom/xingbook/park/view/a;)Lcom/xingbook/park/view/c;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    return-object v0
.end method

.method static synthetic c(Lcom/xingbook/park/view/a;)V
    .locals 0

    invoke-direct {p0}, Lcom/xingbook/park/view/a;->a()V

    return-void
.end method


# virtual methods
.method public a(I)V
    .locals 3

    const/4 v2, 0x0

    const/4 v1, 0x1

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    iget v0, v0, Lcom/xingbook/park/view/c;->a:I

    if-eq v0, v1, :cond_0

    invoke-virtual {p0}, Lcom/xingbook/park/view/a;->clearAnimation()V

    iput-object v2, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    :cond_0
    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    if-nez v0, :cond_1

    new-instance v0, Lcom/xingbook/park/view/c;

    invoke-direct {v0, p0, v2}, Lcom/xingbook/park/view/c;-><init>(Lcom/xingbook/park/view/a;Lcom/xingbook/park/view/c;)V

    iput-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    iput v1, v0, Lcom/xingbook/park/view/c;->a:I

    :cond_1
    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    new-instance v1, Lcom/xingbook/park/view/b;

    invoke-direct {v1, p0, p1}, Lcom/xingbook/park/view/b;-><init>(Lcom/xingbook/park/view/a;I)V

    invoke-virtual {v0, v1}, Lcom/xingbook/park/view/c;->setAnimationListener(Landroid/view/animation/Animation$AnimationListener;)V

    const/16 v0, 0x64

    invoke-virtual {p0, v0}, Lcom/xingbook/park/view/a;->setPercent(I)V

    invoke-direct {p0}, Lcom/xingbook/park/view/a;->a()V

    return-void
.end method

.method public getPercent()I
    .locals 1

    iget v0, p0, Lcom/xingbook/park/view/a;->a:I

    return v0
.end method

.method protected onAttachedToWindow()V
    .locals 0

    invoke-super {p0}, Landroid/view/View;->onAttachedToWindow()V

    invoke-static {p0}, Lcom/xingbook/park/c/c;->b(Landroid/view/View;)V

    return-void
.end method

.method protected onDetachedFromWindow()V
    .locals 0

    invoke-super {p0}, Landroid/view/View;->onDetachedFromWindow()V

    invoke-static {p0}, Lcom/xingbook/park/c/c;->a(Landroid/view/View;)V

    return-void
.end method

.method protected declared-synchronized onDraw(Landroid/graphics/Canvas;)V
    .locals 4

    monitor-enter p0

    :try_start_0
    iget-boolean v0, p0, Lcom/xingbook/park/view/a;->n:Z

    if-eqz v0, :cond_0

    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :goto_0
    monitor-exit p0

    return-void

    :cond_0
    :try_start_1
    iget-object v0, p0, Lcom/xingbook/park/view/a;->d:Landroid/graphics/Paint;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    iget-object v0, p0, Lcom/xingbook/park/view/a;->d:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    iget-object v0, p0, Lcom/xingbook/park/view/a;->d:Landroid/graphics/Paint;

    iget v1, p0, Lcom/xingbook/park/view/a;->e:I

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v0, p0, Lcom/xingbook/park/view/a;->o:Landroid/graphics/RectF;

    iget v1, p0, Lcom/xingbook/park/view/a;->b:I

    int-to-float v1, v1

    iput v1, v0, Landroid/graphics/RectF;->right:F

    iget-object v0, p0, Lcom/xingbook/park/view/a;->o:Landroid/graphics/RectF;

    iget v1, p0, Lcom/xingbook/park/view/a;->c:I

    int-to-float v1, v1

    iput v1, v0, Landroid/graphics/RectF;->bottom:F

    iget-object v0, p0, Lcom/xingbook/park/view/a;->o:Landroid/graphics/RectF;

    iget v1, p0, Lcom/xingbook/park/view/a;->p:F

    iget v2, p0, Lcom/xingbook/park/view/a;->p:F

    iget-object v3, p0, Lcom/xingbook/park/view/a;->d:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    iget-object v0, p0, Lcom/xingbook/park/view/a;->d:Landroid/graphics/Paint;

    iget v1, p0, Lcom/xingbook/park/view/a;->j:I

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    iget v0, p0, Lcom/xingbook/park/view/a;->a:I

    iget v1, p0, Lcom/xingbook/park/view/a;->b:I

    mul-int/2addr v0, v1

    int-to-float v0, v0

    const/high16 v1, 0x42c8

    div-float/2addr v0, v1

    float-to-int v0, v0

    iget-object v1, p0, Lcom/xingbook/park/view/a;->o:Landroid/graphics/RectF;

    int-to-float v0, v0

    iput v0, v1, Landroid/graphics/RectF;->right:F

    iget-object v0, p0, Lcom/xingbook/park/view/a;->o:Landroid/graphics/RectF;

    iget v1, p0, Lcom/xingbook/park/view/a;->c:I

    int-to-float v1, v1

    iput v1, v0, Landroid/graphics/RectF;->bottom:F

    iget-object v0, p0, Lcom/xingbook/park/view/a;->o:Landroid/graphics/RectF;

    iget v1, p0, Lcom/xingbook/park/view/a;->p:F

    iget v2, p0, Lcom/xingbook/park/view/a;->p:F

    iget-object v3, p0, Lcom/xingbook/park/view/a;->d:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    iget-object v0, p0, Lcom/xingbook/park/view/a;->d:Landroid/graphics/Paint;

    iget v1, p0, Lcom/xingbook/park/view/a;->e:I

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    iget-object v0, p0, Lcom/xingbook/park/view/a;->d:Landroid/graphics/Paint;

    iget v1, p0, Lcom/xingbook/park/view/a;->f:I

    int-to-float v1, v1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method protected onMeasure(II)V
    .locals 4

    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getMode(I)I

    move-result v0

    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v1

    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v2

    const/high16 v3, 0x4000

    if-ne v0, v3, :cond_0

    iput v1, p0, Lcom/xingbook/park/view/a;->b:I

    iput v2, p0, Lcom/xingbook/park/view/a;->c:I

    :goto_0
    iget v0, p0, Lcom/xingbook/park/view/a;->b:I

    iget v1, p0, Lcom/xingbook/park/view/a;->c:I

    invoke-virtual {p0, v0, v1}, Lcom/xingbook/park/view/a;->setMeasuredDimension(II)V

    return-void

    :cond_0
    const/16 v0, 0xc8

    iput v0, p0, Lcom/xingbook/park/view/a;->b:I

    const/16 v0, 0x14

    iput v0, p0, Lcom/xingbook/park/view/a;->c:I

    goto :goto_0
.end method

.method public setDuration(J)V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/park/view/a;->m:Lcom/xingbook/park/view/c;

    invoke-virtual {v0, p1, p2}, Lcom/xingbook/park/view/c;->setDuration(J)V

    return-void
.end method

.method public setPercent(I)V
    .locals 0

    iput p1, p0, Lcom/xingbook/park/view/a;->a:I

    invoke-virtual {p0}, Lcom/xingbook/park/view/a;->invalidate()V

    return-void
.end method
